package com.umgsai.thread.thread70;

public class MyThread extends Thread {
	private String num;
	public MyThread(ThreadGroup group, String name, String num) {
		super(group, name);
		this.num = num;
	}
	@Override
	public void run() {
		int numInt = Integer.parseInt(num);
		while (true) {
			System.out.println(Thread.currentThread().getName() + "死循环中");
		}
	}
	
	
	public static void main(String[] args) {
		ThreadGroup group = new ThreadGroup("线程组1");
		MyThread[] myThreads = new MyThread[10];
		for (int i = 0; i < myThreads.length; i++) {
			myThreads[i] = new MyThread(group, "线程" + i, "" + i);
			myThreads[i].start();
		}
		MyThread myThread = new MyThread(group, "报错线程", "a");
		myThread.start();
	}
}
